
<div id="contentAll" class="f-l">
	<form action="<?php echo base_url('panel/ventas/ventas_vendedor'); ?>" method="get" id="frmFiltrosCotiza" 
	class="frmfiltros corner-all8 btn-gray">
		<label for="ffecha1">Fecha del:</label> 
		<input type="text" name="ffecha1" id="ffecha1" value="<?php echo $this->input->get('ffecha1'); ?>" size="10">
		
		<label for="ffecha2">Al:</label> 
		<input type="text" name="ffecha2" id="ffecha2" value="<?php echo $this->input->get('ffecha2'); ?>" size="10"> |  
		
		<label for="ffecha1">Vendedor:</label> 
		<input type="text" name="fvendedor" id="fvendedor" value="<?php echo $this->input->get('fvendedor'); ?>" size="35">
		<input type="hidden" name="fid_vendedor" id="fid_vendedor" value="<?php echo $this->input->get('fid_vendedor'); ?>"> |
		
		<input type="submit" name="enviar" value="Enviar" class="btn-blue corner-all">
	</form>
	
	<a href="<?php echo base_url('panel/ventas/ventasv_pdf/?'.String::getVarsLink()); ?>" class="linksm" target="_blank">
			<img src="<?php echo base_url('application/images/privilegios/pdf.png'); ?>" width="20" height="20"> Imprimir</a>
	<div class="clear" style="margin-bottom: 20px;"></div>
	
<?php foreach($vende['vende'] as $vendedor){
?>
	<strong style="margin-left: 10px;"><?php echo $vendedor->nombre.' '.$vendedor->apellido_paterno.' '.$vendedor->apellido_materno; ?></strong>
	<table class="tblListados corner-all8">
		<tr class="header btn-gray">
			<td class="w10">Fecha</td>
			<td class="w40">Cliente</td>
			<td class="w10">Folio</td>
			<td class="w15">Total</td>
			<td class="w10">Comision</td>
			<td class="w15">T. Comision</td>
		</tr>
	<?php 
		foreach($vendedor->ventas as $key2 => $venta){
	?>
		<tr>
			<td><?php echo $venta->fecha; ?></td>
			<td><?php echo $venta->nombre_fiscal; ?></td>
			<td><?php echo $venta->serie.'-'.$venta->folio; ?></td>
			<td><?php echo String::formatoNumero($venta->subtotal); ?></td>
			<td>
				<input type="text" value="<?php echo $venta->comision_venta; ?>" class="comision vpositive" size="3" 
					data-venta="<?php echo $venta->id_obj; ?>" data-subtotal="<?php echo $venta->subtotal; ?>" data-reg="<?php echo $key2; ?>"> %
			</td>
			<td class="total_comision<?php echo $key2; ?>"></td>
		</tr>
	<?php } ?>
		<tr class="header btn-gray">
			<td colspan="3">Totales</td>
			<td class="ttotal_ventas"></td>
			<td></td>
			<td class="ttotal_comisiones"></td>
		</tr>
	</table>
<?php }?>
	<table class="tblListados corner-all8">
		<tr class="header btn-gray">
			<td colspan="3" class="w60">Totales</td>
			<td class="w15" id="total_ventas"></td>
			<td class="w10"></td>
			<td class="w15" id="total_comision"></td>
		</tr>
	</table>
</div>

<!-- Bloque de alertas -->
<div id="container" style="display:none">
	<div id="withIcon">
		<a class="ui-notify-close ui-notify-cross" href="#">x</a>
		<div style="float:left;margin:0 10px 0 0"><img src="#{icon}" alt="warning" width="64" height="64"></div>
		<h1>#{title}</h1>
		<p>#{text}</p>
		<div class="clear"></div>
	</div>
</div>
<?php if(isset($frm_errors)){
	if($frm_errors['msg'] != ''){ 
?>
<script type="text/javascript" charset="UTF-8">
$(function(){
	create("withIcon", {
		title: '<?php echo $frm_errors['title']; ?>', 
		text: '<?php echo $frm_errors['msg']; ?>', 
		icon: '<?php echo base_url('application/images/alertas/'.$frm_errors['ico'].'.png'); ?>' });
});
</script>
<?php }
}?>
<!-- Bloque de alertas -->
